﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common.Master" AutoEventWireup="true" CodeBehind="ArchiveTypeDeptDoneTree.aspx.cs" Inherits="Web.Views.ArchiveFlowView.ArchiveTypeDeptDoneTree" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

      <script type="text/javascript">
          $(function () {
              //加载公司通讯录Tree
              var userid = $("#ctl00_ContentPlaceHolder1_hdUserId").val();
              var timestamp = new Date().getTime();
              $('#treeArchiveMenu').tree({
                  method: "get",
                  lines: true,
                  idFiled: "id",
                  textFiled: "text",
                  parentField: "pid",
                  cascadeCheck: false,
                  url: "../../HttpHandles/ArchiveHandle.ashx?archiveRecord=yes&userid=" + userid + "&timestamp=" + timestamp + "",
                  onBeforeExpand: function (node, param) {
                  },
                  onLoadSuccess: function (node, data) {
                      window.parent.document.getElementById('Iframe1').src = "../SystemLogin/loadingpage.aspx?Menu_URL=../ArchiveFlowView/ArchiveViewDeptDonePage.aspx?archiveType=" + data[0].children[0].id;
                  }
              ,
                  onSelect: function (node) {
                      if ($('#treeArchiveMenu').tree('isLeaf', node.target)) {
                          //判断是否为归档的树
                          if ($("#hdFileType").val() != "") {
                              window.parent.document.getElementById('Iframe1').src = "../SystemLogin/loadingpage.aspx?Menu_URL=../ArchiveFlowView/ArchiveViewDeptDonePage.aspx?archiveType=" + node.id;
                          }
                          else {
                              window.parent.document.getElementById('Iframe1').src = "../SystemLogin/loadingpage.aspx?Menu_URL=../ArchiveFlowView/ArchiveViewDeptDonePage.aspx?archiveType=" + node.id;
                          }
                      }
                  }
              });
          });
  </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ul id="treeArchiveMenu"></ul>
<asp:HiddenField ID="hdFileType" runat="server" />
<asp:HiddenField ID="hdUserId" runat="server" />
</asp:Content>
